<html>
<head><meta charset="utf-8"><title>Get all crates that are passed to the linker · t-compiler/help · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/index.html">t-compiler/help</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Get.20all.20crates.20that.20are.20passed.20to.20the.20linker.html">Get all crates that are passed to the linker</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="236170784"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Get%20all%20crates%20that%20are%20passed%20to%20the%20linker/near/236170784" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> hyd-dev <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Get.20all.20crates.20that.20are.20passed.20to.20the.20linker.html#236170784">(Apr 26 2021 at 13:13)</a>:</h4>
<p>Is there a graceful way to get all crates that are passed to the linker by <code>rustc</code> (in Miri)?<br>
I'm trying to implement <a href="https://github.com/rust-lang/miri/issues/1170">miri#1170</a>. I have tried <code>TyCtxt::crates()</code> and <code>TyCtxt::dependency_formats()</code>, but the former sometimes reports both <code>panic_unwind</code> and <code>panic_abort</code> (which are not compatible), and the later causes "crate ... required to be available in rlib format, but was not found in this form" errors (because only <code>rmeta</code> files are available).</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>